Add API documentation file (content_intel.api.php)#13
Merged
Conversation
added 3 commits
January 29, 2026 09:26
Add developer documentation for the Content Intelligence module's hook and plugin system, following Drupal's api.php convention. Documents: - hook_content_intel_info_alter() for modifying plugin definitions - Plugin creation guidelines with code examples - Available plugin attribute parameters and methods
Fix PHPCS warning for unused import.
Addresses DX improvements identified during API documentation review: 1. Add hook_content_intel_collect_alter() - Allows modules to modify collected intelligence data - Enables computed/derived metrics based on combined plugin data - Documented in content_intel.api.php with examples 2. Improve API documentation (content_intel.api.php) - Add dependency injection example for plugin development - Document the new collect alter hook - Reference example module for working code 3. Add content_intel_example submodule - WordCountPlugin: Basic plugin without external dependencies - EntityAgePlugin: Advanced plugin with dependency injection - Alter hook implementation demonstrating computed metrics - Comprehensive README with usage instructions All changes pass local drupal-lint and drupal-check.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
content_intel.api.phpfollowing Drupal's standard API documentation conventionCloses #12
Changes
hook_content_intel_info_alter()for modifying plugin definitionsTest plan
ContentIntelPluginManager